﻿<!DOCTYPE html>

<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width" />
    <title>List</title>
    <link rel="stylesheet" href="~/css/font.css">
    <link rel="stylesheet" href="~/css/xadmin.css">
    @*<script src="~/jquery/dist/jquery.min.js"></script>*@
    <script src="~/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="~/js/xadmin.js"></script>
</head>
<body>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">关机记录</a>
            <a>
                <cite>关机记录</cite>
            </a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
        </a>
    </div>
    <div class="layui-fluid">
        @* 布局类 使用此类不会固定宽度，而是 100%自适应*@
        <div class="layui-row layui-col-space15">
            @* 设置行  列之间间隔 15px*@
            <div class="layui-col-md12">
                @* 设置列  12等分*@
                <div class="layui-card">
                    <div class="layui-card-body ">
                        @*卡片式面板面板通常用于非白色背景色的主体内*@
                        @*<div class="layui-col-space15">
                            <div class="layui-inline layui-show-xs-block">
                                <input type="text" id="searchKeywork" name="keyword" placeholder="请输入产品型号名" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-inline layui-show-xs-block">
                                <button type="button" class="layui-btn" id="searchbtn"><i class="layui-icon">&#xe615;</i>搜索</button>
                            </div>
                        </div>*@
                        <table class="layui-table" id="goodstypetablelist" lay-filter="goodstypetablelist"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        layui.use(['table'], function () {
            var table = layui.table;
			var options = {
                elem: '#goodstypetablelist'
                , method: 'post'
                , toolbar: '#toolbar'
                , height: 'full-170'
                , url: '@Url.Action("closelogasync")'
                , page: {
                    layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
                }
                , limit: 20
                , limits: [20, 40, 60, 80, 100]
                , cols: [[
					{ field: 'id', title: '编号', width: 80 },
					{ field: 'userName', title: '用户' },
					{ field: 'productName', title: '商品' },
					{ field: 'offTime', title: '关机时间', width:150 },
                ]]
			};

			var goodstypeTable = table.render(options);

            //搜索事件
            $('#searchbtn').on('click', function () {
                tableReload();
            });

            //刷新表格数据
            var tableReload = function () {
				goodstypeTable.reload({
					where: {
						//keyword: $('#searchKeywork').val().trim()
					},
					page: {
						curr: 1
					}
				});
            }
        });
    </script>
</body>
</html>
